<?php
require(dirname(__FILE__)."/includes/init.php");
$unsub = $_REQUEST['unsub'];
//$db = new mysqls("ab");
if(isset($unsub)){
//	$unsub = "aD1lZWNmNzg4ODgyNGZlNjQxOGEwZWUwYTMxNWNjYzQ2MSZyPTM2NDkzMzY3NCU0MHFxLmNvbSZsPWh0dHAlM0ElMkYlMkY5NTUuY2MlMkZkckF0JmQ9MTkwNg";
    $param = base64_decode($unsub);
    $param = urldecode($param);
    // print_r($param);exit;
    $paramArr = explode("|", $param);
	$paramArr[3] = getBrowserVersion();
	$paramArr[4] = get_onlineip();
    $str = "";
    foreach ($paramArr as $key => $value) {
    	$str = $str.",'".$value."'";
    }
    $str = trim($str,",");
    $sql = "insert into unsub(email,emailId,timestamps,userBrowser,userIp,type,templateId) values(".$str.")";
//	echo $sql;exit;
    $GLOBALS['db']->dbquery($sql);
    header('Location:http://www.hairextensionkingdom.com/unsub.php');
}else{
	exit("param error");
}

?>

